package com.caleble.sample.scheduling;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;

import javax.sql.DataSource;

public class SmsService {
	
	private DataSource dataSource;
	private SmsServiceImplXJ smsServiceXJ;

	public void execute() throws InterruptedException {
		System.out.println("current date is :" + new Date());
		/*try {
			Connection conn = dataSource.getConnection();
			PreparedStatement pStmt = conn.prepareStatement("select count(1) from BAOJINGXINXI");
			ResultSet rs = pStmt.executeQuery();
			rs.next();

			System.out.println(rs.getString(1));
			pStmt.close();
			conn.close();
		} catch (SQLException e) {
			e.printStackTrace();
		}*/
		
	}

	public SmsServiceImplXJ getSmsServiceXJ() {
		return smsServiceXJ;
	}

	public void setSmsServiceXJ(SmsServiceImplXJ smsServiceXJ) {
		this.smsServiceXJ = smsServiceXJ;
	}

	public DataSource getDataSource() {
		return dataSource;
	}

	public void setDataSource(DataSource dataSource) {
		this.dataSource = dataSource;
	}
}